package com.imb.common.mybatis.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiaozhi
 * @since 2023-07-10
 */
@Getter
@Setter
@TableName("imb_log")
@ApiModel(value = "ImbLog对象", description = "")
public class ImbLog {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("操作用户")
    private String username;

    @ApiModelProperty("用户操作")
    private String operation;

    @ApiModelProperty("操作类型（1.查询2.新增3.修改4.删除）")
    private String type;

    @ApiModelProperty("IP地址")
    private String ip;

    @ApiModelProperty("请求方式")
    private String request;

    @ApiModelProperty("操作状态")
    private String status;

    @ApiModelProperty("错误信息")
    private String errorMsg;

    @ApiModelProperty("操作方法")
    private String method;

    @ApiModelProperty("操作地址")
    private String dict;

    @ApiModelProperty("请求地址")
    private String requestDict;

    @ApiModelProperty("请求参数")
    private String param;

    @ApiModelProperty("返回参数")
    private String response;

    @ApiModelProperty("耗时（ms）")
    private String time;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;


}
